package com.usian.controller;

import com.usian.pojo.ETC;
import com.usian.service.EtcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/etc")
public class EtcController {


    @Autowired
    private EtcService etcService;

    @RequestMapping("findAll")
    public  String findAll(Model model){
      List<ETC>etcList= etcService.findAll();
      model.addAttribute("etcList",etcList);
      return  "index";
    }






}
